package co.yixiang.modules.shop.repository;

import co.yixiang.modules.shop.domain.YxSalesCommission;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
* @author frq
* @date 2020-06-11
*/
public interface YxSalesCommissionRepository extends JpaRepository<YxSalesCommission, Integer>, JpaSpecificationExecutor<YxSalesCommission> {
    /**
     * 分组查询月份
     * @return
     */
    @Query(value = "select month from yx_sales_commission group by month",nativeQuery = true)
    List<String> findMonth();
}